<template>
  <div class="scroll-content" ref="wrapper">
      <slot></slot>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref, PropType } from 'vue'
import useScrollHooks from './useScrollHooks'
export default defineComponent({
    props: {
        click: {
            type: Boolean,
            default: true
        },
        probeType: {
            type: Number as PropType<0 | 1 | 2 | 3>,
            default: 0
        }
    },
    emits: ['scroll'],
    setup (props, { emit }) {
        const wrapper = ref<null | HTMLElement>(null)
        const { scroll } = useScrollHooks(wrapper, props, emit)
        return {
            wrapper,
            scroll
        }
    }
})
</script>

<style lang="scss">
.scroll-content {
    width: 100%;
    height: 100%;
}
</style>
